package com.company.common.util;

import java.util.Random;

public class RandomCodeUtil {
    public static StringBuilder code6(){
        String str="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
        StringBuilder code=new StringBuilder(6);
        for(int i=0;i<6;i++) {
            char ch=str.charAt(new Random().nextInt(str.length()));
            code.append(ch);
        }
        return code;
    }
}
